**** DO FILE descriptive analyses : visualisation and tables *** NOTE : replicating such analyses requires to start from the HOD dataset and transform it using the commands below to perform the visualisations. 
*** Figure 1 
gen creation=1
collapse (sum) creation, by(COUNTHQ)
rename COUNTHQ ccode
merge 1:1 ccode using trans
drop if id==.
drop _merge
merge 1:1 id using usdb
drop if _merge!=3
spmap creation using uscoord, id(id) fcolor(Blues) clmethod(custom) clbreaks (1 2 5 10 50 100 363)

***Table1
use HOD_Dec_2021.dta, clear
tab type

*** Figure3
gen creation=1
collapse (sum) creation, by(year)
drop if year==.
twoway (line creation year if year>1844, sort), ylabel(0(10)80) xlabel(1845(5)2017)

****Figure 4
use HOD_Dec_2021.dta, clear
gen creation=1
graph bar (sum) creation if year>1944, over(REGHQ) over(year) asyvars stack

***Table2
asdoc tab subtype REGHQ if type==3 | type==4, column





